package edu.sandau.b230151.b23015121.service;
import edu.sandau.b230151.b23015121.mapper.PetMapper;
import edu.sandau.b230151.b23015121.model.Pet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class PetService {
    @Autowired
    private PetMapper petMapper;

    public List<Pet> findAll(Pet klass) {

        return petMapper.findAll(klass);
    }

    public void deleteById(String id) {
        petMapper.deleteById(id);
    }

    public void save(Pet s) {
        petMapper.save(s);
    }
    public void update(Pet s) {
        petMapper.update(s);
    }
    public Pet getReferenceById(String id) {
        return petMapper.getReferenceById(id);
    }
}
